<template>
  <div class="q-pa-md q-gutter-sm">
    <t-btn
      label="Top"
      icon="keyboard_arrow_up"
      color="primary"
      @click="open('top')"
    />
    <t-btn
      label="Right"
      icon="keyboard_arrow_right"
      color="primary"
      @click="open('right')"
    />
    <t-btn
      label="Bottom"
      icon="keyboard_arrow_down"
      color="primary"
      @click="open('bottom')"
    />
    <t-btn
      label="Left"
      icon="keyboard_arrow_left"
      color="primary"
      @click="open('left')"
    />

    <t-dialog v-model="dialog" :position="position">
      <t-card style="width: 350px">
        <t-linear-progress :value="0.6" color="pink" />

        <t-card-section class="row items-center no-wrap">
          <div>
            <div class="text-weight-bold">The Walker</div>
            <div class="text-grey">Fitz & The Tantrums</div>
          </div>

          <t-space />

          <t-btn flat round icon="fast_rewind" />
          <t-btn flat round icon="pause" />
          <t-btn flat round icon="fast_forward" />
        </t-card-section>
      </t-card>
    </t-dialog>
  </div>
</template>

<script>
  import { ref } from 'vue';

  export default {
    setup() {
      const dialog = ref(false);
      const position = ref('top');

      return {
        dialog,
        position,

        open(pos) {
          position.value = pos;
          dialog.value = true;
        },
      };
    },
  };
</script>
